#ifdef STORAGE_ENABLE
//logMessage(LOGLEVEL_DEBUG, "STORAGE", "", "");

/*************************************************************
 *
 * globals
 *
 *************************************************************/
void setupStorage() {
	int tempResetCounter = getStorageValue(LOGGER_EEPROM_FACILITY);
	logMessage(LOGLEVEL_INFO, "STORAGE", "resets: ", tempResetCounter);
	tempResetCounter++;
	setStorageValue(LOGGER_EEPROM_FACILITY, tempResetCounter);
}

void initStorage() {
	logMessage(LOGLEVEL_DEBUG, "STORAGE", "initStorage", "");
	setStorageValue(TIMER_SYSTEM1_LIGHTON_FACILITY, 17);
	setStorageValue(TIMER_SYSTEM1_LIGHTDURATION_FACILITY, 12);
	setStorageValue(TIMER_SYSTEM2_LIGHTON_FACILITY, 17);
	setStorageValue(TIMER_SYSTEM2_LIGHTDURATION_FACILITY, 12);
}

int getStorageValue(int aStorageFacility) {
	return EEPROM.read(aStorageFacility);
}

void setStorageValue(int aStorageFacility, int aValue) {
	EEPROM.write(aStorageFacility, aValue);
}

void resetCounter() {
	EEPROM.write(LOGGER_EEPROM_FACILITY, 0);
}

#endif
